package com.anxuan.demo.test;

import com.anxuan.demo.model.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class beantest1 {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("springBean.xml");
        Student student = ctx.getBean("student", Student.class);
        System.out.println(student);
        Student student1 = ctx.getBean("student1", Student.class);
        System.out.println(student1);

    }
}
